/** 查询操作日志列表 */
export function listOperlogApi(query: OperlogRecord): Promise<ApiRowsRecord<OperlogRecord[]>> {
  return request({
    url: `monitor/operlog/list`,
    method: 'get',
    params: query
  });
}

/** 查询操作日志详细 */
export function getOperlogApi(id: number): Promise<ApiDataRecord<OperlogRecord>> {
  return request({
    url: `monitor/operlog/${id}`,
    method: 'get'
  });
}

/** 新增操作日志 */
export function addOperlogApi(data: OperlogRecord): Promise<ApiRecord> {
  return request({
    url: "monitor/operlog",
    method: 'post',
    data: data
  });
}

/** 修改操作日志 */
export function updateOperlogApi(data: OperlogRecord): Promise<ApiRecord> {
  return request({
    url: "monitor/operlog",
    method: 'put',
    data: data
  });
}

/** 删除操作日志 */
export function delOperlogApi(id: number[]): Promise<ApiRecord> {
  return request({
    url: `monitor/operlog/${id}`,
    method: 'delete',
  });
}

// 清空操作日志
export function cleanOperlogApi(): Promise<ApiRecord> {
  return request({
    url: '/monitor/operlog/clean',
    method: 'delete'
  })
}